package com.bwie.controller;

import com.bwie.pojo.Dict;
import com.bwie.service.DictService;
import com.bwie.service.impl.DictServiceImpl;
import com.bwie.utils.R;
import org.springframework.web.bind.annotation.*;

import org.springframework.beans.factory.annotation.Autowired;

/**
 * 字典表(tb_dict)表控制层
 *
 * @author xxxxx
 */
@RestController
@RequestMapping("/product/product")
public class DictController {
    /**
     * 服务对象
     */
    @Autowired
    private DictService dictService;

    /**
     * @author: 鑫仔
     * @description: 获取字典数据
     * @params: [java.lang.Integer]
     * @return: com.bwie.utils.R
     * @date: 2025/7/22 11:28
     */
    @PostMapping("getDictByType/{dictType}")
    public R getDictByType(
            @PathVariable(name = "dictType") Integer dictType
    ) {
        return dictService.getDictByType(dictType);
    }

}
